<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import { scoreCommentApi } from '@/feature/cmt/infra/api/scoreCommentApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: scoreCommentApi,
        initListParams() {
          return {
            businessType: 0
          }
        },
        showSelection: false,
        columns: [
          {
            label: '昵称',
            prop: 'userInfo.nickName'
          }, {
            label: '头像',
            type: ColumnType.IMAGE,
            prop: 'userInfo.headImg'
          },
          {
            label: '评论内容',
            searchable: true,
            prop: 'content'
          },
          {
            label: '评论图片',
            type: ColumnType.IMAGE,
            prop: 'imgList'
          },
          {
            label: '平均评分',
            prop: 'avgScore'
          },
          {
            label: '评分1',
            prop: 'score1',
            type: ColumnType.NUMBER
          },
          {
            label: '评分2',
            prop: 'score2',
            type: ColumnType.NUMBER
          },
          {
            label: '评分3',
            prop: 'score3',
            type: ColumnType.NUMBER
          },
          {
            label: '评分4',
            prop: 'score4',
            type: ColumnType.NUMBER
          },
          {
            label: '评分5',
            prop: 'score5',
            type: ColumnType.NUMBER
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

